
########################################################## Debug window ##########################################################

toplevel .find
wm title .find Debug
wm geometry .find 800x500
set txt_h [ttk::frame .find.text_holder]
pack $txt_h -expand 1 -fill both
pack [text $txt_h.info -yscrollcommand { $txt_h.scr set}] -expand 1 -fill both -side left
pack [ttk::scrollbar $txt_h.scr -command {$txt_h.info yview}] -side right -fill y
# grid rowconfigure .find 0 -weight 1

pack [ttk::button .find.find -text "Get It"]


bind .find.find <Button> {
   grab -global .find.find
}


bind .find.find <ButtonRelease> {
   grab release [grab current]
   set what [winfo containing %X %Y]
   if {$what != ""} {
      $txt_h.info delete 1.0 end
      $txt_h.info insert end "$what\n"
      foreach a [$what config] {
         $txt_h.info insert end "\t[lindex $a 0] [$what cget [lindex $a 0]]\n"
      }
   } else {
      $txt_h.info delete 1.0 end
      $txt_h.info insert 1.0 NULL
   }
   update
}